<?php

namespace App\Http\Filters;

class EnterLogFilter extends Filter
{
    protected $simpleFilters = [
        'id',
        'user_id'
    ];

    protected $filters = [
        'field_name',
    ];

    protected function fieldName($val)
    {
        $this->builder->where('field_name', $val);
    }
    protected function userId($val)
    {
        $this->builder->whereHas('user',function ($query) use ($val)
        {
            $query->where('id', '=', $val);
        });
    }
}
